package my.action.authentication;
import javax.servlet.http.*;
import my.controller.*;
import my.db.DAO.AuthenticationDAO;
public class AuthenticationLogOutAction implements  Action{
	 public ActionForward execute(HttpServletRequest request,HttpServletResponse response) throws Exception{
			
		 //Fields
		 	AuthenticationDAO autDAO=new AuthenticationDAO();
		   	ActionForward forward=new ActionForward();
		   	boolean result=true;
		   	
		 // Checking condition
	   		try{
	 	   		result=autDAO.logOutAccount(request);
	   			forward.setRedirect(false);
	   			if(result==true)// if true remove session and call LoadIndex page
	   			{   	
	   				forward.setPath("LoadIndex.jsp");
	   				
	   			}
	  		}catch(Exception ex){
	   		}
	  		return forward;
		}  	
}